package com.xzm.test;

import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;
import com.xzm.service.IUserService;
import com.xzm.service.impl.UserServiceImpl;
import com.xzm.service.impl.UserServiceImpl2;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

/**
 * @author 3052
 * @create 2020-07-26 21:12
 */
public class main {

    public static void main(String[] args) {

        ApplicationContext ac = new ClassPathXmlApplicationContext("bean.xml");
        IUserService userService = (IUserService)ac.getBean("userService");
        userService.saveUser();
        System.out.println(userService);

/*        IUserService userService = (IUserService)ac.getBean("userService2");
        userService.saveUser();
        System.out.println(userService);*/

/*        IUserService userService = (IUserService)ac.getBean("userService3");
        userService.saveUser();
        System.out.println(userService);*/

    }
}
